<?php $this->load->view('sys_header');?>

<script type="text/javascript">


    function ajax_submit(){


        $.messager.progress();
        $.ajax({
            type:"post",
            dataType:'json',
            url:'<?php echo made_admin_url('flink/edit?action=more');?>',
            data:$('#cpform').serialize(),
            success:function(r){
                if(r && r.success)
                {
                    $.messager.progress('close');
                    $.messager.confirm('成功提示','修改成功，返回信息列表。',function(b){
                        if(b)
                        {
                            window.location.href='<?php echo made_admin_url('flink');?>';
                            return false; //hack ie6跳转无效
                        }

                    });
                }
                else
                {
                    lin.msg('发生错误，数据提交失败！','error');
                }
            }
        });

    }

</script>


<div class="nav">
    <h2><a href="<?php echo made_admin_url('main/mainfra');?>">TAYCMS后台管理</a> >  <a href="<?php echo made_admin_url('flink');?>">友情链接管理</a> >  修改 </h2>
</div>



<div class="contenter">
    <div class="editpage">
    <h1></h1>
    <div class="ml"></div>

    <div id="editform">

        <form name="cpform" method="post" autocomplete="off"    id="cpform"   >

            <table  width="100%" border="0" align="left" cellpadding="0" cellspacing="0" >
                <TR>
                    <TD width="100%">

                        <table width="95%" border="0" align="center" cellpadding="3" cellspacing="0"  >
                            <tr>
                                <td width="12%" height="30">网站名称：</td>
                                <td width="88%"><label>
                                    <input type="text" name="webname" id="webname" class="border" value="<?php echo $items['webname'] ;?>" size="50" />
                                </label></td>
                            </tr>


                            <tr>
                                <td height="30">网站链接：</td>
                                <td><label>
                                    <input type="text" name="url" id="url" size="50" class="border" value="<?php echo $items['url'] ;?>" />
                                </label></td>
                            </tr>

                            <tr>
                                <td>网站logo：</td>
                                <td>
                                    <?php echo load_imagebtn(); ?>
                                    <label>
                                        <input name="image_src" id="image_src" class="border" type="text" size="40" value="<?php echo $items['weblogo'] ;?>" readonly="readonly" /> <input type="button" id="image" value="上传图片" class="sub_btn" />
                                    </label>
                                </td>
                            </tr>



                            <tr>
                                <td height="30">网站描述：</td>
                                <td><label>
                                    <input type="text" name="msg" id="msg" size="50" class="border" value="<?php echo $items['msg'] ;?>" />
                                </label></td>
                            </tr>

                            <tr>
                                <td height="30">日IP：</td>
                                <td><label>
                                    <input type="text" name="dayip" id="dayip" size="10" class="border" value="<?php echo $items['dayip'] ;?>" />
                                      </label></td>
                            </tr>

                            <tr>
                                <td height="30">PR：</td>
                                <td><label>
                                    <input type="text" name="pr" id="pr" size="10" class="border" value="<?php echo $items['pr'] ;?>" />
                                </label></td>
                            </tr>

                            <tr>
                                <td height="30">站长：</td>
                                <td><label>
                                    <input type="text" name="name" id="name" size="10" class="border" value="<?php echo $items['name'] ;?>" />
                                </label></td>
                            </tr>
                            <tr>
                                <td height="30">站长QQ：</td>
                                <td><label>
                                    <input type="text" name="qq" id="qq" size="10" class="border" value="<?php echo $items['qq'] ;?>" />
                                </label></td>
                            </tr>
                            <tr>
                                <td height="30">站长Email：</td>
                                <td><label>
                                    <input type="text" name="email" id="email" size="10" class="border" value="<?php echo $items['email'] ;?>" />
                                </label></td>
                            </tr>
                            <tr>
                                <td height="30">显示：</td>
                                <td><label><input type="radio" name="isshow" value="1" accept="" <?php if ($items['isshow'] == 1):?>checked="checked"<?php endif; ?> > 是</label>
                                    <label><input type="radio" name="isshow" value="0" accept="" <?php if ($items['isshow'] == 0):?>checked="checked"<?php endif; ?>> 否</label>
                                </td>
                            </tr>


                            <tr>
                                <td height="30">添加时间：</td>
                                <td><label>
                                    <input type="text" name="addtime" id="addtime" size="30" readonly="readonly"  class="easyui-datetimebox border" style="width: 140px;" value="<?php echo date('Y-m-d H:i:s',$items['addtime']) ;?>" />
                                    请使用正确格式如：2012-03-25 11:47:48，默认为当前时间</label></td>
                            </tr>

                        </table>


                    </TD>
                </TR>
                <tr>
                    <td height="30" colspan="2" align="center">
                        <br><br>
                        <input name="id" type="hidden"  value="<?php echo $items['id']; ?>"    />
                        <label>
                        <input name="submit" type="button" id="submit" value="提交" onclick="ajax_submit()"   class="sub_btn" />
                    </label>
                        <label>
                            <input name="re" type="button" id="re" value="返回" onclick="window.location.href='<?php echo made_admin_url('ad');?>'"   class="sub_btn" />
                        </label>
                    </td>
                </tr>
            </table>


        </form>


    </div>

</div>
</div>







<?php $this->load->view('sys_footer');?>